package ru.dc.object;

/**
 * <pre>
 * User: Penkov Vladimir
 * Date: 01.11.2010
 * Time: 12:58:21
 * </pre>
 */
public class UserInfo {

    private String interest;
    private String speed;
    private String email;
    private long sharesize;
    private String nick;

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getInterest() {
        return interest;
    }

    public void setInterest(String interest) {
        this.interest = interest;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public long getSharesize() {
        return sharesize;
    }

    public void setSharesize(long sharesize) {
        this.sharesize = sharesize;
    }

    public String getSpeed() {
        return speed;
    }

    public void setSpeed(String speed) {
        this.speed = speed;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserInfo userInfo = (UserInfo) o;

        if (sharesize != userInfo.sharesize) return false;
        if (email != null ? !email.equals(userInfo.email) : userInfo.email != null) return false;
        if (interest != null ? !interest.equals(userInfo.interest) : userInfo.interest != null) return false;
        if (nick != null ? !nick.equals(userInfo.nick) : userInfo.nick != null) return false;
        if (speed != null ? !speed.equals(userInfo.speed) : userInfo.speed != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = interest != null ? interest.hashCode() : 0;
        result = 31 * result + (speed != null ? speed.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (int) (sharesize ^ (sharesize >>> 32));
        result = 31 * result + (nick != null ? nick.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "email='" + email + '\'' +
                ", interest='" + interest + '\'' +
                ", speed='" + speed + '\'' +
                ", sharesize=" + sharesize +
                ", nick='" + nick + '\'' +
                '}';
    }
}
